﻿
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleDetail.aspx.cs" Inherits="TrainingWorkshop.MVPWebsite.Role.Views.RoleDetail"
    Title="RoleDetail" MasterPageFile="~/Shared/DefaultMaster.master" %>
<asp:Content ID="content" ContentPlaceHolderID="DefaultContent" Runat="Server">
        <h1>&nbsp; Role&nbsp; Detail</h1>
        
  
    &nbsp;&nbsp;<asp:Panel ID="Panel1" runat="server" GroupingText = "Role" 
            BorderColor="White" Height="374px">
            <br />
  
    <br />
        <table border="0" cellpadding="0" cellspacing="0" bgcolor="White">
                <tr>
                    <td align="center" bgcolor="White" valign="middle" width="40" colspan="0" 
                        style="height: 25px">
                        Role</td>
                    <td align="center" bgcolor="White" valign="middle" width="80" colspan="0" 
                        style="height: 25px">
                        <asp:TextBox ID="RoleName" runat="server" Width="82px"></asp:TextBox>
                        </td>
                    <td align="center" bgcolor="White" valign="middle" 
                        style="width: 125px; height: 25px;" colspan="0">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                            BorderColor="#FF3300" ControlToValidate="RoleName" 
                            ErrorMessage="Please input name" ForeColor="Red"></asp:RequiredFieldValidator>
                       </td>
                    <td align="center" bgcolor="White" valign="middle" colspan="0" 
                        style="width: 36px; height: 25px">
                        Status&nbsp;</td>
                    <td align="center" bgcolor="White" valign="middle" width="120" colspan="0" 
                        style="height: 25px">
                        <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="16px" 
                            RepeatDirection="Horizontal" style="margin-left: 4px; margin-bottom: 0px;" 
                            Width="159px">
                            <asp:ListItem>In Use</asp:ListItem>
                            <asp:ListItem>No Use</asp:ListItem>
                        </asp:RadioButtonList>
                        </td>
                         <td align="center" bgcolor="White" valign="middle" colspan="0" 
                        style="width: 136px; height: 25px">
                             <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                 ControlToValidate="RadioButtonList1" ErrorMessage="Please select status" 
                                 ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                </tr>
                </table>

                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <br />
                    <br />
                    <br />
                    <asp:Panel ID="Panel2" runat="server" GroupingText="Role Authority" 
                        Height="171px" style="margin-left: 14px" Width="574px">
                        <asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatDirection="Horizontal"  RepeatColumns="3"  style="margin-left: 47px">
                        </asp:CheckBoxList>
                        <br />
                        <script language="javascript" type="text/javascript">





                function checkIssueType(source, args) {
                    var chkListaTipoModificaciones = document.getElementById('<%= CheckBoxList1.ClientID %>');
                    if (chkListaTipoModificaciones != null) {
                        var chkLista = chkListaTipoModificaciones.getElementsByTagName("input");
                        for (var i = 0; i < chkLista.length; i++) {
                            if (chkLista[i].checked) {
                                args.IsValid = true;
                                return;
                            }
                        }
                        args.IsValid = false;
                    }
                }
  </script>
                        <br />
                        <br />
                        <br />
                    </asp:Panel>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:CustomValidator ID="CustomValidator1" runat="server" 
                        ClientValidationFunction="checkIssueType" 
                        ErrorMessage="Please select role authority" ForeColor="Red"></asp:CustomValidator>
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="saverole" runat="server" onclick="saverole_Click" 
                        
                style="margin-left: 19px;background-color: Transparent;background-image: url('../images/add.jpg'); background-position: left center;background-repeat: no-repeat; margin-top: 0px;" 
                Text="  Save Role" Height="25px" Width="103px"  />
                    <br />
               
        </asp:Panel>
 

</asp:Content>
